import java.util.*;
import java.util.Date;

class Customer {
    String name;
    String contact;
    String deliveryAddress;
    boolean active;

}

class Order {
    Date createDate;
    String status;
    Customer customer;
    List<OrderDetail> orderDetails = new ArrayList<>();
    Payment payment;
}
class OrderDetail {
    int quantity;
    Product product;
    Order order;

    double calculateSubTotal() {
        return product.getPriceForQuantity(quantity);
    }

    double calculateWeight() {
        return product.getWeight() * quantity;
    }
}

class Product {
    String title;
    double weight;
    String description;

    double getPriceForQuantity(int quantity) {
        // Implementation  
        return 0.0; // Placeholder  
    }

    double getWeight() {
        return weight;
    }

}

abstract class Payment {
    double amount;
}


class Credit extends Payment {
    String number;
    String type;
    Date expireDate;

}


class Cash extends Payment {
    double cashTendered;

}

class WireTransfer extends Payment {
    String bankID;
    String bankName;

}

class AliPay extends Payment {
    String number;

}

class WeixinPay extends Payment {
    String number;

}